import request from '@/utils/request'

// 获取打卡状态
export function getAttendanceRecordList(data) {
  return request({
    url: '/system/attendanceRecord/list',
    method: 'post',
    data,
  })
}

//更新打卡
export function editAttendance(data) {
  return request({
    url: '/system/attendanceRecord/edit',
    method: 'post',
    data,
  })
}

// 打卡
export function addAttendance(data) {
  return request({
    url: '/system/attendanceRecord/add',
    method: 'post',
    data,
  })
}
// 获取补卡次数
export function getAttendanceApplyApi(data) {
  return request({
    url: '/system/attendanceApply/getListByType',
    method: 'get',
    data,
  })
}
// 考勤统计
export function getStatistics(data) {
  return request({
    url: '/system/attendanceRecord/getStatistics',
    method: 'GET',
    params: data,
  })
}
// 搜索工单

export function selectOrderNoApi(data = '') {
  return request({
    url: '/system/work/selectOrderNo',
    method: 'GET',
    params: data,
  })
}

//  假勤提交接口  外勤 出彩 补卡之类
export function attendanceApplyApi(data = '') {
  return request({
    url: '/system/attendanceApply/add',
    method: 'post',
    data,
  })
}

// 查询接口  假勤
export function attendanceApplyListApi(data = '') {
  return request({
    url: '/system/attendanceApply/list',
    method: 'get',
    params: data,
  })
}
// 假勤 详情
export function attendanceApplyInfoApi(applyId) {
  return request({
    url: '/system/attendanceApply/getInfo',
    method: 'get',
    params: {
      applyId: applyId,
    },
  })
}
// 考勤组统计接口
export function getListByTypeApi(data) {
  return request({
    url: '/system/attendanceRecord/getListByType',
    method: 'get',
    params: data,
  })
}
// 获取异常打卡
export function getListYiChangApi(data) {
  return request({
    url: '/system/attendanceRecord/listYiChang',
    method: 'post',
    data,
  })
}
// 添加财务
export function addFinancialApplyControllerApi(data = '') {
  return request({
    url: '/system/financialApply/add',
    method: 'post',
    data,
  })
}

// 查询财务
export function listFinancialApplyControllerApi(data = '') {
  return request({
    url: '/system/financialApply/list',
    method: 'get',
    params: data,
  })
}
// 财务 详情
export function financialApplyApiInfo(financialId = '') {
  return request({
    url: '/system/financialApply/getInfo',
    method: 'get',
    params: {
      financialId: financialId,
    },
  })
}

// 行政添加
export function addAdministrativeApply(data = '') {
  return request({
    url: '/system/administrativeApply/add',
    method: 'post',
    data,
  })
}

// 查询行政
export function listAdministrativeApply(data = '') {
  return request({
    url: '/system/administrativeApply/list',
    method: 'get',
    params: data,
  })
}
// 行政 详情
export function administrativeApplyApiInfo(administrativeId = '') {
  return request({
    url: '/system/administrativeApply/getInfo',
    method: 'get',
    params: {
      administrativeId: administrativeId,
    },
  })
}
// 人事添加
export function addPersonnelApply(data = '') {
  return request({
    url: '/system/personnelApply/add',
    method: 'post',
    data,
  })
}

// 人事行政
export function listPersonnelApply(data = '') {
  return request({
    url: '/system/personnelApply/list',
    method: 'get',
    params: data,
  })
}
// 人事详情
export function personnelApplyApiInfo(personnelId = '') {
  return request({
    url: '/system/personnelApply/getInfo',
    method: 'get',
    params: {
      personnelId: personnelId,
    },
  })
}

// 查询审批流程
export function getApprovalProcess(params) {
  return request({
    url: '/system/attendanceRule/approve',
    method: 'get',
    params: params,
  })
}

// 查询审核中心
export function getSelectApproveList(params) {
  return request({
    url: '/system/attendanceRule/selectApproveList',
    method: 'get',
    params: params,
  })
}

// 查询审核中心数量
export function getSelectApproveCount(params) {
  return request({
    url: '/system/attendanceRule/selectApproveCount',
    method: 'get',
    params: params,
  })
}

// 审核审批
export function attendanceRuleApi(params) {
  return request({
    url: '/system/attendanceRule/authorization',
    method: 'get',
    params: params,
  })
}
